<template>
	<villageSort ref="villageSort" />
</template>

<script>
import villageSort from '@/components/villageSort.vue';
import { listByVillage } from '@/api/home.js';
import baseCategoryMixins from "./mixins/baseCategoryMixins.js"

export default {
	name: 'Right2CategoryVillage',
	components: {
		villageSort,		
	},
	mixins: [baseCategoryMixins],
	data() {
		return {
			query:{
				year:(new Date()).getFullYear(),
				categoryId:1,//1-香榧 2-笋竹 3-山黄精
			},		
		};
	},	

	methods: {
		loadData() {
			listByVillage(this.query).then(result => {
				console.log('listByVillage Result = ', result);
				let listPlant = result.listPlant;
				let listSale = result.listSale;
				this.$refs.villageSort.initListData(listPlant,listSale)				
			});
		},	
	}
};
</script>
<style lang="scss" scoped>
</style>
